﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LINQPad.OpenAccess.Helpers
{
    public static class Guard
    {
        public static void ArgumentNotNull( object argument, string argumentName )
        {
            if ( argument == null )
                throw new ArgumentNullException( argumentName );
        }
        public static void ArgumentNotNullOrEmpty( string argument, string argumentName )
        {
            if ( argument == null )
                throw new ArgumentNullException( "argumentName" );
            if ( argument.Length == 0 )
                throw new ArgumentException( "The argument must not be empty !", argumentName );
        }
    }
}
